package com.example.farmeri.pojo;

import android.os.Parcel;
import android.os.Parcelable;

import com.example.farmeri.pojo.User;

import java.util.Date;
import java.util.Set;

public class Role implements Parcelable {

    private static final long serialVersionUID = 1L;


    private String id;
    /**
     * 角色名称
     */
    private String name;

    private String identity;

    private String requestPlace;

    private String age;

    private String tel;

    private String email;

    private Date createDate;

    private Date updateDate;

    private String remarks;

    public Role() {
    }

    protected Role(Parcel in) {
        id = in.readString();
        name = in.readString();
        identity = in.readString();
        requestPlace = in.readString();
        age = in.readString();
        tel = in.readString();
        email = in.readString();
        remarks = in.readString();
    }

    public static final Creator<Role> CREATOR = new Creator<Role>() {
        @Override
        public Role createFromParcel(Parcel in) {
            return new Role(in);
        }

        @Override
        public Role[] newArray(int size) {
            return new Role[size];
        }
    };

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
    //private Set<Menu> menuSet;

    private Set<User> userSet;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //    public Set<Menu> getMenuSet() {
    //        return menuSet;
    //    }
    //
    //    public void setMenuSet(Set<Menu> menuSet) {
    //        this.menuSet = menuSet;
    //    }

    public Set<User> getUserSet() {
        return userSet;
    }

    public void setUserSet(Set<User> userSet) {
        this.userSet = userSet;
    }


    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getRequestPlace() {
        return requestPlace;
    }

    public void setRequestPlace(String requestPlace) {
        this.requestPlace = requestPlace;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Role{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", identity='" + identity + '\'' +
                ", requestPlace='" + requestPlace + '\'' +
                ", age='" + age + '\'' +
                ", tel='" + tel + '\'' +
                ", email='" + email + '\'' +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", remarks='" + remarks + '\'' +
                ", userSet=" + userSet +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(name);
        dest.writeString(identity);
        dest.writeString(requestPlace);
        dest.writeString(age);
        dest.writeString(tel);
        dest.writeString(email);
        dest.writeString(remarks);
    }

}
